module Adder32bit(S,Cout,A,B,Cin);
   parameter T_cal = 5;

   input [31:0] A,B;
   input Cin;
   output [31:0] S; 
   output Cout;
   wire C1,C2,C3;  //Intermediate carries

	 assign #T_cal {{Cout},{S}} = A + B + Cin;

endmodule

/*
module TestAdder;
    reg    [31:0] A, B;
    reg    Cin;
		reg    [32:0] i,j;
    wire   [31:0] Sum;
    wire   Cout;

    Adder32bit _32bit1(Sum,Cout,A,B,Cin);

    initial begin
	$monitor ($time,"  A=%d  B=%d  Cin=%d  Sum=%d  Cout=%d",A,B,Cin,Sum,Cout);
	A = 0;
	B = 0;
	Cin = 0;
		for(i=0; i < 4294967000; i = i+100000000)
        	  begin
						A = i;
			for(j=0; j < 4294967000; j = j+100000000)
			   begin
				 B = j;
			     #10 Cin = 0;
           #10 Cin = 1;
			end
	          end
	#1 $finish;
    end

endmodule
*/
